/**
 * Description: CardServiceImpl.java
 * Copyright (c) 2008-2009  Neo. 
 * All Rights Reserved.
 * @version 1.0  
 */
package org.paradise.dms.services.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.paradise.dms.dao.impl.CardDAOImpl;
import org.paradise.dms.pojo.Card;
import org.paradise.dms.services.CardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * Description: Copyright (c) 2008-2009 Neo. All Rights Reserved.
 * 
 * @version 1.0 Mar 24, 2009 2:38:07 PM 李萌（neolimeng@gmail.com）created
 */
@Service
public class CardServiceImpl implements CardService {

	private static Logger log = Logger.getLogger(DormitoryServiceImpl.class);
	@Autowired
	@Qualifier("cardDAOImpl")
	private CardDAOImpl cardDaoImpl;
	public CardDAOImpl getCardDaoImpl() {
		return cardDaoImpl;
	}
	public void setCardDaoImpl(CardDAOImpl cardDaoImpl) {
		this.cardDaoImpl = cardDaoImpl;
	}
	/**
	 * Description: 通过饭卡的id取得学生学号
	 * @Version1.0 
	 * @param carid 
	 */
	public Card getStudentNo(String cardid){
		return cardDaoImpl.getStudentNo(cardid);
	}

	/**
	 * 
	 * Description: 通过饭卡的id取得学生信息
	 * 
	 * @Version1.0 
	 * @param cardid
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List findStudentByCardid(
			String cardid) {
		return cardDaoImpl.findStudentByCardid(cardid);
		}
}
